<?php
/**
 * Controller is the customized base controller class.
 * All controller classes for this application should extend from this base class.
 */
class RController extends coreInit
{
	
	/**
	 * @var controllerInit
	 */
	protected $controller;
	
	/**
	 * @var viewInit
	 */
	protected $view;
	
	/**
	 * 初始化
	 */
	public function __construct() {
		parent::__construct();
		$InitPHP_conf = InitPHP::getConfig();
		$this->controller = $this->load('controller', 'c'); //导入Controller
		$this->view       = $this->load('view', 'v'); //导入View
		$this->view->set_template_config($InitPHP_conf['template']); //设置模板
		$this->view->assign('init_token', $this->controller->get_token()); //全局输出init_token标记
		//注册全局变量，这样在Service和Dao中通过$this->common也能调用Controller中的类
		$this->register_global('common', $this->controller);
		
		
		
		print_r("123");
	}
	
}